package com.tmc.constant;

public class OrderConstant {
	
	public static String ORDER_STATUS_BOOKING = "ORDER_STATUS_BOOKING";//订座失败时，订座中
	public static String ORDER_STATUS_CHECKING = "ORDER_STATUS_CHECKING"; //待审核
	public static String ORDER_STATUS_REFUSED = "ORDER_STATUS_REFUSED";//审核失败
	public static String ORDER_STATUS_PAYING = "ORDER_STATUS_PAYING";//订座成功 && 客户非月结(包括个人订单)，支付中
	public static String ORDER_STATUS_CANCELED = "ORDER_STATUS_CANCELED";//取消订单
	public static String ORDER_STATUS_TICKETING = "ORDER_STATUS_TICKETING";//订座成功 &&（支付成功||客户月结），出票中
	public static String ORDER_STATUS_TICKETED = "ORDER_STATUS_TICKETED";//出票成功
	public static String ORDER_STATUS_CHANGING = "ORDER_STATUS_CHANGING";//改期中
	public static String ORDER_STATUS_CHANGED = "ORDER_STATUS_CHANGED";//已改期
	public static String ORDER_STATUS_REFUNDING = "ORDER_STATUS_REFUNDING";//退票中
	public static String ORDER_STATUS_REFUNDED = "ORDER_STATUS_REFUNDED";//已退票
	public static String ORDER_STATUS_INVALIDING = "ORDER_STATUS_INVALIDING";//待废票
	public static String ORDER_STATUS_INVALIDED = "ORDER_STATUS_INVALIDED";//已废票
	
	
	public static String PLATFORM_ZIYING = "PLATFORM_ZIYING";
	public static String PLATFORM_CTRIP = "PLATFORM_CTRIP";
	public static String PLATFORM_TAOBAO = "PLATFORM_TAOBAO";
	public static String PLATFORM_QUNAER = "PLATFORM_QUNAER";
	public static String PLATFORM_TONGCHENG = "PLATFORM_TONGCHENG";
	
	public static String FLIGHT_TYPE_OW = "1";
	public static String FLIGHT_TYPE_RT = "2";
	public static String FLIGHT_TYPE_UN = "3";
	public static String FLIGHT_TYPE_MU = "4";
	
	/**
	 *  1:身份证 2:护照 3:学生证 4:军人证 6:驾驶证 7:回乡证 8:台胞 10:港澳通行证 22:台湾通行证 23:士兵证 24:临时身份证 25:户口簿 26:警官证 27:出生证明 99:其它
	 */
	public static String CARD_TYPE_SHENFENZHENG = "1";
	public static String CARD_TYPE_HUZHAO = "2";
	public static String CARD_TYPE_XUESHENGZHENG = "3";
	public static String CARD_TYPE_JUNRENZHENG = "4";
	public static String CARD_TYPE_JIASHIZHENG = "6";
	public static String CARD_TYPE_HUIXIANGZHENG = "7";
	public static String CARD_TYPE_TAIBAOZHENG = "8";
	public static String CARD_TYPE_GANGAOTONGXINGZHENG = "10";
	public static String CARD_TYPE_TAIWANTONGXINGZHENG = "22";
	
	public static String PASSENGER_TYPE_ADT = "ADT";
	public static String PASSENGER_TYPE_CHD = "CHD";
	public static String PASSENGER_TYPE_INF = "INF";
	
	//中转类型
	public static String TRANSFER_TYPE_DIRECT ="0";//直飞
	public static String TRANSFER_TYPE_TRANSFER ="1";//中转
	
	//机票类型（1:BSP 2:B2B 3:B2C 4:P2P）
	public static String TICKET_TYPE_BSP = "1";
	public static String TICKET_TYPE_B2B = "2";
	public static String TICKET_TYPE_B2C = "3";
	public static String TICKET_TYPE_P2P = "4";
	
	// 1:自动出票;2:手工出票
	public static Integer TICKETING_TYPE_MANUAL = 1;
	public static Integer TICKETING_TYPE_AUTOMATIC = 2;
	
//	//票证状态
//	public static String TICKET_TYPE_NORMAL = "TICKET_TYPE_NORMAL";//正常票
//	public static String TICKET_TYPE_REFUND = "TICKET_TYPE_REFUND";//退票
//	public static String TICKET_TYPE_INVALID = "TICKET_TYPE_INVALID";//废票
	
	
	
	public enum OrderSource {

		WEB("WEB", "网页订单"),
		APP("APP", "app订单"),
		MINI("MINI", "小程序订单"),
		SYSTEM("SYSTEM", "手工订单"),
		INTERFACE("INTERFACE", "接口订单");

		private String source;
		private String sourceName;
		
		OrderSource (String source, String sourceName){
			this.source = source;
			this.sourceName = sourceName;
		}

		public String getSource() {
			return source;
		}

		public void setSource(String source) {
			this.source = source;
		}

		public String getSourceName() {
			return sourceName;
		}

		public void setSourceName(String sourceName) {
			this.sourceName = sourceName;
		}

	}
	
	public static String getOrderSourceName(String source){
		for (OrderSource value : OrderSource.values()){
			if (value.getSource().equals(source)){
				return value.getSourceName();
			}
		}
		return "";
	}
}
